import request from "@/utils/request";

// 获取树形数据
export const getTreeApi = () => {
  return request({
    method: "GET",
    url: "/manager/business-hall/tree",
  });
};
//获取城市列表

export const getShengFen = () => {
  return request({
    method: "GET",
    url: "/manager/areas/children",
  });
};
export const getCityCountyApi = (parentId) => {
  return request({
    method: "GET",
    url: "/manager/areas/children",
    params: {
      parentId,
    },
  });
};
//获取树形控件点击后的地址信息
export const getAdressApi = (id) => {
  return request({
    method: "GET",
    url: `/manager/business-hall/${id}`,
    params: {
      id,
    },
  });
};
//获取员工信息
export const getYuanGongApi = (id, page) => {
  return request({
    method: "GET",
    url: "/manager/business-hall/user/page",
    params: {
      page: page.page,
      pageSize: page.pageSize,
      agencyId: id,
    },
  });
};
// 获取运输模板

export const getYunMoBanApi = (params) => {
  return request({
    method: "GET",
    url: "/manager/carriages",
    params,
  });
};
// 获取地图覆盖形状点
export const getMapData = (id) => {
  return request({
    url: `/manager/business-hall/scope/${id}/1`,
    method: "GET",
    params: {
      id,
    },
  });
};
